#!/bin/sh
# Generic prerm for IIIMF language engines
# Copyright © 2007 Roger So <rogerso@debian.org>

set -e

ua_remove () {
	update-alternatives \
		--remove xinput-$1 \
		/etc/X11/xinit/xinput.d/$2 ;
}

case "$1" in
        remove|upgrade|deconfigure)
                /usr/bin/iiimf-le-tools -g --remove /usr/lib/iiim/le/unihan2/unihan2.so

		ua_remove all_ALL unihan
		ua_remove zh_CN   unihan
		ua_remove zh_TW   unihan
		ua_remove zh_HK   unihan
		ua_remove zh_MO   unihan
		ua_remove zh_SG   unihan
                ;;
        failed-upgrade)
                ;;
        *)
                echo "prerm called with unknown argument \`$1'" >&2
                exit 1
esac

#DEBHELPER#

# vim:fileencoding=utf-8
